from django.conf.urls import url
from api import views
from utils.upload.UploadImages import UploadView
from api.view import login, message

urlpatterns = [

    url(r'message/$', message.MessageView.as_view()),
    url(r'login/$', login.LoginView.as_view()),
    url(r'account/$', login.UsernameEmail.as_view()),
    url(r'email_add/$', login.EmailAdd.as_view()),
    url(r'reset_pwd/$', login.ResetPasswordView.as_view()),
    url(r'user_news/$', login.UserNewsView.as_view()),
    url(r'user_data/$', login.UserDataView.as_view()),
    url(r'user_data_add/$', login.UserDataAddView.as_view()),
    url(r'user_space/(?P<pk>\d+)/$', login.UserSpaceView.as_view()),
    url(r'user_posts/(?P<pk>\d+)/$', login.UserPostsView.as_view()),
    url(r'user_orther/$', login.UserOtherView.as_view()),
    url(r'user_orther_list/$', login.UserOtherListView.as_view()),
    url(r'user_setpwd/$', login.SetPasswordView.as_view()),

    url(r'social/$', views.SocialView.as_view()),
    url(r'social/(?P<pk>\d+)/$', views.SocialDetailView.as_view()),
    url(r'social_add/$', views.SocialAddView.as_view()),
    url(r'search/$', views.SearchView.as_view()),

    url(r'concerned/$', views.ConcernedView.as_view()),

    url(r'topic/$', views.TopicView.as_view()),
    url(r'topic/(?P<pk>\d+)/$', views.TopicDetailView.as_view()),
    url(r'topic_detail/(?P<pk>\d+)/$', views.SocialDetailView.as_view()),

    url(r'news/$', views.NewsView.as_view()),
    url(r'news/(?P<pk>\d+)/$', views.NewsDetailView.as_view()),
    url(r'news_add/$', views.NewsAddView.as_view()),

    url(r'follow/$', views.FollowView.as_view()),
    url(r'follow_add/(?P<pk>\d+)/$', views.FollowAdd.as_view()),
    url(r'favor_record/(?P<pk>\d+)/$', views.FavorRecordView.as_view()),

    url(r'comments_add/(?P<pk>\d+)/$', views.CommentAddView.as_view()),
    url(r'comments_favor/$', views.CommentFavorView.as_view()),

    url(r'upload/$', UploadView),

]
